1. Field of the Invention
The present invention relates to a storage apparatus having a semiconductor storage media, and in particular, to a technology for managing a data storage area.
2. Description of the Related Art
In recent years, a nonvolatile semiconductor memory, such as a flash memory, which supports high-speed access, is attracting attention. A flash memory which has come into wide use is called a NAND flash memory, and is divided into MLC (Multiple Level Cell) and SLC (Single Level Cell) according to the characteristic of the storage device. The MLC has a storage capacity of two or more bits per memory cell, and has features of low bit cost, low performance, and short endurance. The SLC has a storage capacity of one bit per memory cell, and has features of high bit cost, high performance, and long endurance.
The flash memory includes a plurality of flash memory chips. Each of the flash memory chips has a plurality of memory blocks (hereinafter, referred to as “block”) for storing data. The flash memory has a feature that data is erased in a block unit. In the flash memory, a bit can only be changed in one direction (1→0), and in order to change a bit in the other direction, it is necessary to erase a block once and to change all the blocks to 1. However, an erase count of a block in the flash memory has an upper limit (100000 in the SLC and 10000 in the MLC). In a block (hereinafter, referred to as “worn-out block”) in which the erase count reaches the upper limit, an error may occur during the read and write operations.
For this reason, when a flash memory as a substitute for a hard disk is coupled to a computer, only some of blocks may reach the upper limit of the erase count due to a bias of a write frequency for each block, and may be disabled. In order to solve this problem, JP-A-2007-305210 discloses a technology that stores data, which is predicted to have a high rewrite frequency, in an SLC area in advance, and stores data, which is predicted to have a low rewrite frequency, in an MLC area in advance.
The SSD (Solid State Drive) as a storage apparatus using a flash memory includes an SSD having a flash memory of one type of SLC or MLC and an SSD having flash memories of SLC and MLC. In an SSD having SLC and MLC, like the technology disclosed in JP-A-2007-305210, the storage destination of data is defined depending on the contents or the characteristics of data to be stored. The SSD has substitute blocks as a substitute area in advance therein. When all the substitute blocks are used up, the SSD becomes unwritable, and the SSD is worn out.
When the SSD is mounted as a storage media of a storage system, the following three modes may be considered depending on the type of the flash memory forming the SSD: one of an SSD having an SLC and an SSD having an MLC is used; an SSD having an SLC and an SSD having an MLC are used together; and an SSD having an SLC and an MLC is used. When such an SSD is mounted on a storage system, a different SSD is allocated as a substitute for an SSD (hereinafter, referred to as “worn-out SSD”) which becomes unwritable because all the substitute blocks are used up.